﻿using RXY_Mall.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RXY_Mall.Data.Mapping.Goods
{
    public class gw_goodsAttributeMap : NopEntityTypeConfiguration<gw_goods>
    {
        public gw_goodsAttributeMap()
        {
            this.HasMany(g => g.gw_marketing_coupon)
                .WithMany(cr => cr.gw_goods)
                .Map(m => m.ToTable("gw_marketing_coupon_mapping"));

            this.HasMany(g => g.gw_marketing_returned)
                .WithMany(cr => cr.gw_goods)
                .Map(m => m.ToTable("gw_marketing_returned_mapping"));

            this.HasMany(g => g.gw_goods_service)
                .WithMany(cr => cr.gw_goods)
                .Map(m => m.ToTable("gw_goods_service_mapping"));
            
        }
    }
}
